Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor thread pool configuration #736

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

aprudhomme
Copy link
Contributor

Change the thread pool settings to have a standardized structure. This should make it more straightforward to add new pools or settings.

Thread pool settings are now grouped by type:

threadPoolConfiguration:
  <pool_name>:
    maxThreads: 16
    maxBufferedItems: 250

When <pool_name> is one of: search, index, luceneserver, replicationserver, fetch, grpc, metrics, vector_merge.

Settings:

  • maxThreads - max threads for the thread pool
  • maxBufferedItems - max tasks to queue
  • threadNamePrefix - prefix to add to thread names

- Name prefix for threads created by metrics threadpool executor
- MetricsExecutor

* - vector_merge.maxThreads
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our configs are all in camel case, should this be camel case as well? We can also just call the ExecutorType VECTORMERGE to make this easier.

@@ -323,7 +324,11 @@ private void fetchFields(SearchContext searchContext)
hitBuilders.sort(Comparator.comparing(Hit.Builder::getLuceneDocId));

IndexState indexState = searchContext.getIndexState();
int fetch_thread_pool_size = indexState.getThreadPoolConfiguration().getMaxFetchThreads();
int fetch_thread_pool_size =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: should we update these variable names and make them camel case?

@aprudhomme aprudhomme merged commit fa7240e into Yelp:main Sep 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants